public class Homework1 {
    public static int i;
    public static void main(String[] args) throws InterruptedException {
        Thread[]array=new Thread[20];

        for (i = 0; i < array.length; i++) {
            array[i]=new Thread(()->{
                //System.out.println(i);
                System.out.println(" 线程"+i+"正在运行");
            });
            array[i].start();
            array[i].join();
        }


        System.out.println("OK");
    }
}
